package com.ymatou.iapi.csim.service;

import com.ymatou.iapi.coupon.parameter.CheckCouponsData;
import com.ymatou.iapi.csim.parameter.SendMessageToCSResp;
import com.ymt.base.YmatouBaseCall;
import com.ymt.core.tool.FormatUtil;
import com.ymttest.utils.DataUtil;
import com.ymttest.utils.EnvSetup;
/**
*获取消息列表Call
*FreeMaker Template自动生成代码
*/
public class SendMessageCall extends YmatouBaseCall{
	private static String opurl ="api/User/SendMessage";
	
	public SendMessageCall() {
		super(EnvSetup.getSystemUrl("csim_iapi"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	
	 public String getStatus()
	 {
	        return getString("Status");
	 }
	 public String getMsg()
	 {
	        return getString("Msg");
	 }
    public SendMessageToCSResp getData()
    {
    	SendMessageToCSResp data = null;
        try {
            data = (SendMessageToCSResp) FormatUtil.GSONToObject(DataUtil.Json.parseJsonObj(getString("Result")).toString(), SendMessageToCSResp.class);

        } catch (Exception e) {
            e.printStackTrace();
        }
        return data;
    }
}